package com.novel.entiy.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author chihuo
 * @date 2022/4/5
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "章节分页参数")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ChapterPageDTO extends PageParams implements Serializable {
    @ApiModelProperty(value = "")
    private Long id;

    /**
     * 文章id
     */
    @NotNull(message = "参数有误")
    @ApiModelProperty(value = "文章id")
    private Long novelId;

    /**
     * 章节名称
     */
    @NotBlank(message = "章节名称不能为空")
    @ApiModelProperty(value = "章节名称")
    private String chapterName;

    /**
     * 章节号
     */
    @ApiModelProperty(value = "章节号")
    private Integer chapterNo;
}